-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ebe, mbe): added recovery to MPCv2 #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c107cb0 to
25c9a75
Compare
fa2d675 to
35c71ca
Compare
| const coin = bitgo.coin(req.decoded.coin); | ||
|
|
||
| // setup clients and retreive the keys | ||
| // TODO: this needs to be segerated if the EBE instance cannot retrieve both keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a ticket and add here
793c7ba to
a23341c
Compare
fb598d9 to
4116bd6
Compare
b3dc3d5 to
902eb4b
Compare
| const { BigNumber } = await import('bignumber.js'); | ||
|
|
||
| const MPC = new Ecdsa(); | ||
| const publicKey = MPC.deriveUnhardened(params.commonKeychain, 'm/0').slice(0, 66); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: seed should be a parameter like m/{seed}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with default being m/0
|
|
||
| const chainId = await baseCoin['getChainId'](); | ||
|
|
||
| const [accountNumber, sequenceNo] = await baseCoin['getAccountDetails'](senderAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to call the function like this?
|
|
||
| // post processing of the response | ||
| if (isEthLikeCoin(baseCoin)) { | ||
| const { AbstractEthLikeNewCoins } = await import('@bitgo-beta/sdk-coin-eth'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't need to do this anymore. just cast as AbstractEthLikeNewCoins on baseCoin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import from @bitgo-beta/abstract-eth
e9861f3 to
d6e2002
Compare
1a4d80e to
acef0ae
Compare
9415d58 to
2545b25
Compare
mohammadalfaiyazbitgo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see unresolved comments.
aaae8a2 to
787c431
Compare
https://bitgoinc.atlassian.net/jira/software/c/projects/WP/boards/340?assignee=712020%3A33a7aa1d-2687-4db8-a101-ad18996acf6f&selectedIssue=WP-5168